﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Medival_Snake
{
    class WayPointBuilder
    {

        public void CreateRect(int wpIndex, int x, int y)
        {
            if (wpIndex == 1)
            {
                Game1.Lvl1.WayPointsUp.Add(new Rectangle(
                                 x * Game1.Lvl1.TileWidth,
                                 y * Game1.Lvl1.TileHeight,
                                 Game1.Lvl1.TileWidth,
                                 Game1.Lvl1.TileHeight));
            }

            if (wpIndex == 2)
            {
                Game1.Lvl1.WayPointsDown.Add(new Rectangle(
                                 x * Game1.Lvl1.TileWidth,
                                 y * Game1.Lvl1.TileHeight,
                                 Game1.Lvl1.TileWidth,
                                 Game1.Lvl1.TileHeight));
            }

            if (wpIndex == 3)
            {
                Game1.Lvl1.WayPointsRight.Add(new Rectangle(
                                 x * Game1.Lvl1.TileWidth,
                                 y * Game1.Lvl1.TileHeight,
                                 Game1.Lvl1.TileWidth,
                                 Game1.Lvl1.TileHeight));
            }

            if (wpIndex == 4)
            {
                Game1.Lvl1.WayPointsLeft.Add(new Rectangle(
                                 x * Game1.Lvl1.TileWidth,
                                 y * Game1.Lvl1.TileHeight,
                                 Game1.Lvl1.TileWidth,
                                 Game1.Lvl1.TileHeight));
            }

            if (wpIndex == 5)
            {
                Game1.Lvl1.WayPointsAllDir.Add(new Rectangle(
                                 x * Game1.Lvl1.TileWidth,
                                 y * Game1.Lvl1.TileHeight,
                                 Game1.Lvl1.TileWidth,
                                 Game1.Lvl1.TileHeight));
            }
        }

    }
}
